/**
 * @summar 文章模块y
 * @author 姓名
 * @summary ...
 */

import * as articleApi from '@/api/article'
export default {
  namespaced: true,
  state: {
  // 文章列表
    articleList: [],
  },
  mutations: {
    SET_ARTICLE_LIST(state, newValue) {
      state.articleList = newValue
    }
  },
  actions: {
    async updateArticleList({ commit }, id) {
      const res = await articleApi.getArticleList(id)
      commit('SET_ARTICLE_LIST', res)
    }
  }
}
